//
//  AlibabaCloudPush.h
//  MyApp
//
//  Created by apple on 2017/6/20.
//
//

#import <Foundation/Foundation.h>
#import <UserNotifications/UserNotifications.h>

@interface AlibabaCloudPush : NSObject<UNUserNotificationCenterDelegate>

/**
 *    注册苹果推送，获取deviceToken用于推送
 *
 *    @param     application
 */
- (void)registerAPNS:(UIApplication *)application ;

- (void)initCloudPush ;
/*
 *  苹果推送注册成功回调，将苹果返回的deviceToken上传到CloudPush服务器
 */
- (void) didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken ;

/*
 *  苹果推送注册失败回调
 */
- (void) didFailToRegisterForRemoteNotificationsWithError:(NSError *)error ;

/**
 *    注册推送消息到来监听
 */
- (void)registerMessageReceive ;
/**
 *    处理到来推送消息
 *
 *    @param     notification
 */
- (void)onMessageReceived:(NSNotification *)notification ;

/*
 *  App处于启动状态时，通知打开回调
 */
- (void) didReceiveRemoteNotification:(NSDictionary*)userInfo ;

- (void) didReceiveRemoteNotificationBack:(NSDictionary*)userInfo ;
@end
